<!DOCTYPE html>
<html>
<head>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
    <meta charset="UTF-8">
    <link href="/css/vendor/common.css" rel="stylesheet" type="text/css">
    <link href="/css/vendor/cmp-controls.css" type="text/css" rel="stylesheet">
    <link href="/css/vendor/firmware-download.less" rel="stylesheet/less" type="text/css">
    <script src="/js/less.min.js"></script>
    <title>飞马测试固件下载中心</title>
</head>
<body>
<main>
    <header>
        <div class="center-wrap">
            <div class="logo-1 center-v"><a href="/firmware/firmwareDownloadList"></a></div>
            <div class="logo-2"></div>
        </div>
    </header>
    <div class="edit-wrap">
        <p class="title" id="title"></p>
        <p class="button"><a id="url">DOWNLOAD</a></p>
        <p class="description">发版说明</p>
        <div class="main" id="html">

        </div>
    </div>
</main>
</body>
<script src="/js/jquery-3.2.1.min.js"></script>
<script src="/js/vendor/common.js"></script>
<script src="/js/vendor/cmp-controls.js"></script>
<script>
    $(function () {
        feimaPost("/firmware/getFirmwareDetail", {
            "id": getQueryString("id")
        }, function (result) {
            if (result.status == 0){
                console.log(result.data);
                $("#title").append(result.data.created_at.slice(0, 10) + "&nbsp;&nbsp;&nbsp;&nbsp;" + result.data.version + "——" + result.data.name);
                $("#url").attr("href", result.data.url);
                $("#html").append(result.data.html);
            }else {
                FAlert(result.message);
            }
        });
    });
</script>
</html>